        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            // Check if an item is selected
            if (DropDownList1.SelectedIndex != -1)
            {
                // Get the selected color value and trim whitespace
                string selectedColor = DropDownList1.SelectedItem.Value.Trim();
                // Set the label's foreground color to the selected color
                Label1.ForeColor = System.Drawing.ColorTranslator.FromHtml(selectedColor);
            }
            else
            {
                // If no item is selected, set the label's color to black
                Label1.ForeColor = System.Drawing.Color.Black;
            }
        }